<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Database
 *
 * @author kevinthant
 */
use Backuper\Settings\Database;
class Backuper_Zend_Application_Resource_Database extends Zend_Application_Resource_ResourceAbstract{
    //put your code here
    
    public function init(){
        
        $options = $this->getOptions();
        
        foreach($options as $key => $value){
            if($key == 'schemas'){
                $options['schemas'] = array();
                $temp = explode(',', $value);
                
                foreach($temp as $repo){
                    $options['schemas'][] = trim($repo);
                }
            }
        }
        
        Database::getInstance($options);
    }
    
}
